package tum.in.rost.pp;

import weka.classifiers.functions.SMO;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.util.Arrays;
import java.util.Collection;

public class PredictProteins {
	public SMO BESTSMOMODEL = new SMO();
	public static String DATALOCATION="";
	
	public SMO retrievModel() throws FileNotFoundException, ClassNotFoundException, IOException {
		ObjectInputStream ois = new ObjectInputStream(new FileInputStream(InstanceDataParser.SMO_MODEL_SERIALIZED_FILE));
		SMO smo = (SMO) ois.readObject();
		ois.close();
		return smo;
	}
	
	public PredictProteins() throws FileNotFoundException, ClassNotFoundException, IOException{
		BESTSMOMODEL=retrievModel();
	}
	
	public void predict(){
		//use the BESTSMOMODEL TO perform the evaluation
		
	}
	
	public static void main( String args[]) throws FileNotFoundException, ClassNotFoundException, IOException{
		try{
		DATALOCATION=args[0];
		
		InstanceDataParser.init(DATALOCATION);
		InstanceDataParser.specifiedAttrributes = Arrays.asList(new String[] {"pssm", "chemprop_hyd", "ri_acc", "psic_numSeq", "class"});
		InstanceDataParser.windowSize = 17;
		
		}
		catch(Exception e){
			throw  new IllegalArgumentException("please Provide Correct Location of Arff file");
		}
		PredictProteins predictor = new PredictProteins();
		predictor.predict();
	}
	
}